import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 徐海涛
 * Date: 2022-02-24
 * Time: 12:55
 */
public class TestDemo {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        TreeNode root = binaryTree.createTree();
        binaryTree.postOrder(root);
        System.out.println();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        System.out.println(binaryTree.size(root));
        System.out.println("叶子节点的个数");
        binaryTree.getLeafNodeCount(root);
        System.out.println(binaryTree.count1);
        System.out.println("k层节点个数");
        System.out.println(binaryTree.getKLevelNodeCount(root,3));
        System.out.println("树的高度");
        System.out.println(binaryTree.getHeight(root));
        System.out.println("查找节点");
        System.out.println(binaryTree.find(root,'E'));
        System.out.println("是否是完全二叉树");
        System.out.println(binaryTree.isCompleteTree(root));
        System.out.println("层序遍历结果");
    }
}

